<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
<%@ page  language="java" errorPage="" %>
<%@ page import="java.util.List" %>
<%@ page import="com.webapp.models.FormBean" %>
<%@ page language="java" session="true" %>

<%  
	FormBean bean = new FormBean();
	session.setAttribute("Bean", bean);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="indexCSE336.css" />
<title>CSE336 - Assignment 2</title>

<style type="text/css">
	/*<![CDATA[*/
	 div.c2 {text-align:center;}
	 span.c1 {font-size:70%}
	 #errors { color:red; margin: 15px; }
	/*]]>*/
</style>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
	var form_good = false;
	
	function formvalidation() {
		if($('.requiredNotBlank').val() == "")
			form_good = false;
			return false;
			
		if(form_good != true)
			return false;	
		
		return true;
	}
	$(document).ready(function () { 
		
		
		$('.requiredNotBlank').bind('blur', function() {
			var x = $(this);
			form_good = true;
			$(x).css("background","white");
			$.ajax({
				type:"GET",
				  url: 'AjaxController',
				  data: "var="+$(this).val()+"&attr="+$(this).attr('name'),
				  success: function(data) {
					  if(data != "") {
						  form_good = false;
						  $(x).css("background","red");
						  alert(data);
					  }
				  }
					
				});
		});
		
	});

</script>
</head>
<body>
	<div id="wrapper">
		<div id="test"></div>
		<form name="theform" method="post" action="Success.html" onclick="return formvalidation()">
			<div id="top">
				<div id="logo">
				<h2>MyProfile Create User</h2>
				</div>
			<div id="nav"><a href="">Login</a></div>
			</div>
			<div id="content">
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris posuere facilisis metus, a condimentum leo rhoncus vitae. Vestibulum posuere tortor vel elit congue gravida nec at justo. Sed accumsan vulputate erat, et ornare ipsum sagittis dictum.</p>
				<h3>New User Registration</h3>
				<span class="smallfont">* Indicates Required Field</span>
				<div id="createAccount">
				<h4>Create Your Account</h4>
				<table width="800" cellspacing="10">
				<tr>
				<td align="right">*Email<br />
				<span class="smallfont"> </span></td>
				<td><input class="requiredNotBlank" type="text" name="email" size="20" /><br />
				<span class="smallfont2">Please provide a valid e-mail address as your Username. Your business e-mail address is preferred.</span></td>
				</tr>
				<tr>
				<td align="right">*Password<br />
				<span class="smallfont"> </span></td>
				<td><input class="requiredNotBlank" type="password" name="password" size="20" /> *Confirm Password <input name="confirmpassword" class="requiredNotBlank" type="password" size="20" /><br />
				<span class="smallfont2">Please provide a valid e-mail address as your Username. Your business e-mail address is preferred.</span></td>
				</tr>
				</table>
				</div>
				<div id="userInformation">
				<h4>User Information</h4>
				<span class="smallfont">* Indicates Required Field</span>
				<table cellspacing="5">
				<tr>
				<td align="right">Salutation</td>
				<td><select class="requiredNotBlank" name="salutation" >
				<option value="1">Dr</option>
				<option value="2">Miss</option>
				<option value="3">Mr</option>
				<option value="4">Mrs</option>
				<option value="5">Ms</option>
				</select></td>
				</tr>
				<tr>
				<td align="right">*First Name (Given Name)</td>
				<td><input class="requiredNotBlank"type="text" name="name" size="20" /></td>
				<td> </td>
				<td align="right">*Prefered Language</td>
				<td><select class="requiredNotBlank"name="language" title="Required Field. Please choose your preferred language for communication material">
				<option value="0">Brazilian Portuguese</option>
				<option value="1">Bulgarian</option>
				<option value="2">Canadian French</option>
				<option value="3">Czech</option>
				<option value="4">Dutch</option>
				<option value="5" selected="selected">English</option>
				<option value="6">French</option>
				<option value="7">German</option>
				<option value="8">Greek</option>
				<option value="9">Hungarian</option>
				<option value="10">Italian</option>
				<option value="11">Japanese</option>
				<option value="12">Korean</option>
				<option value="13">Latin American Spanish</option>
				<option value="14">Norwegian</option>
				<option value="15">Polish</option>
				<option value="16">Portuguese</option>
				<option value="17">Romanian</option>
				<option value="18">Russian</option>
				<option value="19">Simplified Chinese</option>
				<option value="20">Slovak</option>
				<option value="21">Slovenian</option>
				<option value="22">Spanish</option>
				<option value="23">Traditional Chinese</option>
				<option value="24">Turkish</option>
				</select></td>
				</tr>
				<tr>
				<td align="right">Middle Name</td>
				<td><input name="middlename" type="text" size="20" /></td>
				<td> </td>
				<td align="right">* Company's Industry</td>
				<td><select class="requiredNotBlank" name="companyindustry">
				<option value="1">Aerospace &amp; Defense</option>
				<option value="2">Automotive</option>
				<option value="3">Chemicals</option>
				<option value="4">Communications</option>
				<option value="5">Consumer Products</option>
				<option value="6">Education &amp; Research</option>
				<option value="7">Engineering &amp; Construction</option>
				<option value="8">Financial Services</option>
				<option value="9">Healthcare</option>
				<option value="10">High Technology</option>
				<option value="11">Industrial Manufacturing</option>
				<option value="12">Insurance</option>
				<option value="13">ISV - Independent Software Vendor</option>
				<option value="14">Life Sciences</option>
				<option value="15">Media &amp; Entertainment</option>
				<option value="16">Natural Resources</option>
				<option value="17">Oil &amp; Gas</option>
				<option value="18">Other</option>
				<option value="19">Professional Services</option>
				<option value="20">Public Sector</option>
				<option value="21">Retail</option>
				<option value="22">Travel &amp; Transportation</option>
				<option value="23">Utilities</option>
				<option value="24">VAR / System Integrator</option>
				</select></td>
				</tr>
				<tr>
				<td align="right">* Last Name</td>
				<td><input class="requiredNotBlank" name="lastname" type="text" size="20" /></td>
				<td> </td>
				<td align="right">* Job Title</td>
				<td><input class="requiredNotBlank" name="jobtitle" type="text" size="20" /></td>
				</tr>
				<tr>
				<td align="right">* Business Phone</td>
				<td><input class="requiredNotBlank" name="bPhone" type="text" size="20" /></td>
				<td> </td>
				<td align="right">* Job Role</td>
				<td><select  class="requiredNotBlank" name="jobRole">
				<option value="1">Administration</option>
				<option value="2">Advanced Planning</option>
				<option value="3">Business Development</option>
				<option value="4">Call Center</option>
				<option value="5">Compliance Risk and Management</option>
				<option value="6">Customer Service / Support</option>
				<option value="7">Data Storage and Management</option>
				<option value="8">E-Commerce</option>
				<option value="9">Executive Management</option>
				<option value="10">Facilities / Property Management</option>
				<option value="11">Finance / Accounting</option>
				<option value="12">Human Resources</option>
				<option value="13">Information Security</option>
				<option value="14">Information Sys. / Information Tech.</option>
				<option value="15">IT / Datacenter Operations</option>
				<option value="16">Legal / Contracts</option>
				<option value="17">Logistics / Distribution</option>
				<option value="18">Manufacturing</option>
				<option value="19">Marketing / Advertising</option>
				<option value="20">Middle Management</option>
				<option value="21">Operations</option>
				<option value="22">Order Management / Fulfillment</option>
				<option value="23">Other</option>
				<option value="24">Payroll / Benefits</option>
				<option value="25">Product Development</option>
				<option value="26">Project Management</option>
				<option value="27">Public Relations</option>
				<option value="28">Purchasing / Procurement</option>
				<option value="29">R&amp;D / Scientific</option>
				<option value="30">Sales</option>
				<option value="31">Shipping / Traffic / Transportation</option>
				<option value="32">Software Development</option>
				<option value="33">Student</option>
				<option value="34">Training</option>
				<option value="35">Warehousing</option>
				</select></td>
				</tr>
				<tr>
				<td align="right">* Company</td>
				<td><input class="requiredNotBlank" name="company2" type="text" size="20" /></td>
				<td> </td>
				<td> </td>
				<td><input name="getproducts" type="checkbox" /> <span class="smallfont2">Yes, send me e-mail on Oracle Products, Services, and Events.</span><br />
				<span class="smallfont2 c1">To opt-out please click the Do Not E-mail link on the bottom of the page.</span></td>
				</tr>
				</table>
				</div>
				<div id="primaryAddress">
				<h4>Primary Address</h4>
				<span class="smallfont">* Indicates Required Field</span>
				<table cellspacing="5">
				<tr>
				<td align="right">* Country</td>
				<td><select class="requiredNotBlank" name="country">
				<option>Please Select...</option>
				<option value="1">Afghanistan</option>
				<option value="2">Albania</option>
				<option value="3">Algeria</option>
				<option value="4">American Samoa</option>
				<option value="5">Andorra</option>
				<option value="6">Angola</option>
				<option value="7">Anguilla</option>
				<option value="8">Antarctica</option>
				<option value="9">Antigua and Barbuda</option>
				<option value="10">Argentina</option>
				<option value="11">Armenia</option>
				<option value="12">Aruba</option>
				<option value="13">Australia</option>
				<option value="14">Austria</option>
				<option value="15">Azerbaijan</option>
				<option value="16">Bahamas</option>
				<option value="17">Bahrain</option>
				<option value="18">Bangladesh</option>
				<option value="19">Barbados</option>
				<option value="20">Belarus</option>
				<option value="21">Belgium</option>
				<option value="22">Belize</option>
				<option value="23">Benin</option>
				<option value="24">Bermuda</option>
				<option value="25">Bhutan</option>
				<option value="26">Bolivia</option>
				<option value="27">Bosnia and Herzegovina</option>
				<option value="28">Botswana</option>
				<option value="29">Bouvet Island</option>
				<option value="30">Brazil</option>
				<option value="31">British Indian Ocean Territory</option>
				<option value="32">Brunei Darussalam</option>
				<option value="33">Bulgaria</option>
				<option value="34">Burkina Faso</option>
				<option value="35">Burundi</option>
				<option value="36">Cambodia</option>
				<option value="37">Cameroon</option>
				<option value="38">Canada</option>
				<option value="39">Cape Verde</option>
				<option value="40">Cayman Islands</option>
				<option value="41">Central African Republic</option>
				<option value="42">Chad</option>
				<option value="43">Chile</option>
				<option value="44">China</option>
				<option value="45">Christmas Island</option>
				<option value="46">Cocos (Keeling) Islands</option>
				<option value="47">Colombia</option>
				<option value="48">Comoros</option>
				<option value="49">Congo</option>
				<option value="50">Congo The Democratic Republic</option>
				<option value="51">Cook Islands</option>
				<option value="52">Costa Rica</option>
				<option value="53">Cote Divoire</option>
				<option value="54">Croatia</option>
				<option value="55">Cyprus</option>
				<option value="56">Czech Republic</option>
				<option value="57">Denmark</option>
				<option value="58">Djibouti</option>
				<option value="59">Dominica</option>
				<option value="60">Dominican Republic</option>
				<option value="61">Ecuador</option>
				<option value="62">Egypt</option>
				<option value="63">El Salvador</option>
				<option value="64">Equatorial Guinea</option>
				<option value="65">Eritrea</option>
				<option value="66">Estonia</option>
				<option value="67">Ethiopia</option>
				<option value="68">Falkland Islands (Malvinas)</option>
				<option value="69">Faroe Islands</option>
				<option value="70">Fiji</option>
				<option value="71">Finland</option>
				<option value="72">France</option>
				<option value="73">French Guiana</option>
				<option value="74">French Polynesia</option>
				<option value="75">French Southern Territories</option>
				<option value="76">Gabon</option>
				<option value="77">Gambia</option>
				<option value="78">Georgia</option>
				<option value="79">Germany</option>
				<option value="80">Ghana</option>
				<option value="81">Gibraltar</option>
				<option value="82">Greece</option>
				<option value="83">Greenland</option>
				<option value="84">Grenada</option>
				<option value="85">Guadeloupe</option>
				<option value="86">Guam</option>
				<option value="87">Guatemala</option>
				<option value="88">Guinea</option>
				<option value="89">Guinea-Bissau</option>
				<option value="90">Guyana</option>
				<option value="91">Haiti</option>
				<option value="92">Heard and Mc Donald Islands</option>
				<option value="93">Holy See (Vatican City State)</option>
				<option value="94">Honduras</option>
				<option value="95">Hong Kong</option>
				<option value="96">Hungary</option>
				<option value="97">Iceland</option>
				<option value="98">India</option>
				<option value="99">Indonesia</option>
				<option value="100">Iraq</option>
				<option value="101">Ireland</option>
				<option value="102">Israel</option>
				<option value="103">Italy</option>
				<option value="104">Jamaica</option>
				<option value="105">Japan</option>
				<option value="106">Jordan</option>
				<option value="107">Kazakhstan</option>
				<option value="108">Kenya</option>
				<option value="109">Kiribati</option>
				<option value="110">Korea</option>
				<option value="111">Kuwait</option>
				<option value="112">Kyrgyzstan</option>
				<option value="113">Lao Peoples Democratic Republic</option>
				<option value="114">Latvia</option>
				<option value="115">Lebanon</option>
				<option value="116">Lesotho</option>
				<option value="117">Liberia</option>
				<option value="118">Libya</option>
				<option value="119">Liechtenstein</option>
				<option value="120">Lithuania</option>
				<option value="121">Luxembourg</option>
				<option value="122">Macau</option>
				<option value="123">Macedonia</option>
				<option value="124">Madagascar</option>
				<option value="125">Malawi</option>
				<option value="126">Malaysia</option>
				<option value="127">Maldives</option>
				<option value="128">Mali</option>
				<option value="129">Malta</option>
				<option value="130">Marshall Islands</option>
				<option value="131">Martinique</option>
				<option value="132">Mauritania</option>
				<option value="133">Mauritius</option>
				<option value="134">Mayotte</option>
				<option value="135">Mexico</option>
				<option value="136">Micronesia Federated States of</option>
				<option value="137">Moldova Republic of</option>
				<option value="138">Monaco</option>
				<option value="139">Mongolia</option>
				<option value="140">Montenegro</option>
				<option value="141">Montserrat</option>
				<option value="142">Morocco</option>
				<option value="143">Mozambique</option>
				<option value="144">Myanmar</option>
				<option value="145">Namibia</option>
				<option value="146">Nauru</option>
				<option value="147">Nepal</option>
				<option value="148">Netherlands</option>
				<option value="149">Netherlands Antilles</option>
				<option value="150">New Caledonia</option>
				<option value="151">New Zealand</option>
				<option value="152">Nicaragua</option>
				<option value="153">Niger</option>
				<option value="154">Nigeria</option>
				<option value="155">Niue</option>
				<option value="156">Norfolk Island</option>
				<option value="157">Northern Mariana Islands</option>
				<option value="158">Norway</option>
				<option value="159">Oman</option>
				<option value="160">Pakistan</option>
				<option value="161">Palau</option>
				<option value="162">Palestinian Territory</option>
				<option value="163">Panama</option>
				<option value="164">Papua New Guinea</option>
				<option value="165">Paraguay</option>
				<option value="166">Peru</option>
				<option value="167">Philippines</option>
				<option value="168">Pitcairn</option>
				<option value="169">Poland</option>
				<option value="170">Portugal</option>
				<option value="171">Puerto Rico</option>
				<option value="172">Qatar</option>
				<option value="173">Reunion</option>
				<option value="174">Romania</option>
				<option value="175">Russian Federation</option>
				<option value="176">Rwanda</option>
				<option value="177">Saint Helena</option>
				<option value="178">Saint Kitts and Nevis</option>
				<option value="179">Saint Lucia</option>
				<option value="180">Saint Vincent and the Grenadines</option>
				<option value="181">Samoa</option>
				<option value="182">San Marino</option>
				<option value="183">Sao Tome and Principe</option>
				<option value="184">Saudi Arabia</option>
				<option value="185">Senegal</option>
				<option value="186">Serbia</option>
				<option value="187">Seychelles</option>
				<option value="188">Sierra Leone</option>
				<option value="189">Singapore</option>
				<option value="190">Slovakia (Slovak Republic)</option>
				<option value="191">Slovenia</option>
				<option value="192">Solomon Islands</option>
				<option value="193">Somalia</option>
				<option value="194">South Africa</option>
				<option value="195">South Georgia and the South Sandwich Islands</option>
				<option value="196">Spain</option>
				<option value="197">Sri Lanka</option>
				<option value="198">St. Pierre and Miquelon</option>
				<option value="199">Suriname</option>
				<option value="200">Svalbard and Jan Mayen Islands</option>
				<option value="201">Swaziland</option>
				<option value="202">Sweden</option>
				<option value="203">Switzerland</option>
				<option value="204">Taiwan</option>
				<option value="205">Tajikistan</option>
				<option value="206">Tanzania United Republic of</option>
				<option value="207">Thailand</option>
				<option value="208">Timor-Leste</option>
				<option value="209">Togo</option>
				<option value="210">Tokelau</option>
				<option value="211">Tonga</option>
				<option value="212">Trinidad and Tobago</option>
				<option value="213">Tunisia</option>
				<option value="214">Turkey</option>
				<option value="215">Turkmenistan</option>
				<option value="216">Turks and Caicos Islands</option>
				<option value="217">Tuvalu</option>
				<option value="218">Uganda</option>
				<option value="219">Ukraine</option>
				<option value="220">United Arab Emirates</option>
				<option value="221">United Kingdom</option>
				<option value="222">United States Minor Outlying Islands</option>
				<option value="223">Uruguay</option>
				<option value="224">USA</option>
				<option value="225">Uzbekistan</option>
				<option value="226">Vanuatu</option>
				<option value="227">Venezuela</option>
				<option value="228">Viet Nam</option>
				<option value="229">Virgin Islands (British)</option>
				<option value="230">Virgin Islands (U.S.)</option>
				<option value="231">Wallis and Futuna Islands</option>
				<option value="232">Western Sahara</option>
				<option value="233">Yemen</option>
				<option value="234">Zambia</option>
				<option value="235">Zimbabwe</option>
				</select></td>
				<td align="right">* City<span class="smallfont"> </span></td>
				<td><input class="requiredNotBlank" name="city" type="text" size="20" /></td>
				</tr>
				<tr>
				<td align="right">Company<br />
				<span class="smallfont"> </span></td>
				<td><input name="company3" type="text" size="20" /><br />
				<span class="smallfont2"><input type="checkbox" />I do not have a company name.</span></td>
				<td align="right">* State<span class="smallfont"> </span></td>
				<td><select class="requiredNotBlank" name="state">
				<option value="" selected="selected">Select a State</option>
				<option value="AL">Alabama</option>
				<option value="AK">Alaska</option>
				<option value="AZ">Arizona</option>
				<option value="AR">Arkansas</option>
				<option value="CA">California</option>
				<option value="CO">Colorado</option>
				<option value="CT">Connecticut</option>
				<option value="DE">Delaware</option>
				<option value="DC">District Of Columbia</option>
				<option value="FL">Florida</option>
				<option value="GA">Georgia</option>
				<option value="HI">Hawaii</option>
				<option value="ID">Idaho</option>
				<option value="IL">Illinois</option>
				<option value="IN">Indiana</option>
				<option value="IA">Iowa</option>
				<option value="KS">Kansas</option>
				<option value="KY">Kentucky</option>
				<option value="LA">Louisiana</option>
				<option value="ME">Maine</option>
				<option value="MD">Maryland</option>
				<option value="MA">Massachusetts</option>
				<option value="MI">Michigan</option>
				<option value="MN">Minnesota</option>
				<option value="MS">Mississippi</option>
				<option value="MO">Missouri</option>
				<option value="MT">Montana</option>
				<option value="NE">Nebraska</option>
				<option value="NV">Nevada</option>
				<option value="NH">New Hampshire</option>
				<option value="NJ">New Jersey</option>
				<option value="NM">New Mexico</option>
				<option value="NY">New York</option>
				<option value="NC">North Carolina</option>
				<option value="ND">North Dakota</option>
				<option value="OH">Ohio</option>
				<option value="OK">Oklahoma</option>
				<option value="OR">Oregon</option>
				<option value="PA">Pennsylvania</option>
				<option value="RI">Rhode Island</option>
				<option value="SC">South Carolina</option>
				<option value="SD">South Dakota</option>
				<option value="TN">Tennessee</option>
				<option value="TX">Texas</option>
				<option value="UT">Utah</option>
				<option value="VT">Vermont</option>
				<option value="VA">Virginia</option>
				<option value="WA">Washington</option>
				<option value="WV">West Virginia</option>
				<option value="WI">Wisconsin</option>
				<option value="WY">Wyoming</option>
				</select></td>
				</tr>
				<tr>
				<td align="right">*Address 1<br />
				<span  class="requiredNotBlank" class="smallfont"> </span></td>
				<td><input name="address" type="text" size="20" /></td>
				<td align="right">* Postal Code<br />
				<span class="smallfont"> </span></td>
				<td><input class="requiredNotBlank" name="postal" type="text" size="20" /></td>
				</tr>
				<tr>
				<td align="right">Address2<br />
				<span class="smallfont"> </span></td>
				<td><input name="address2" type="text" size="20" /></td>
				<td align="right">* Business Phone<br />
				<span class="smallfont"> </span></td>
				<td><input class="requiredNotBlank" name="bPhone2" type="text" size="20" /></td>
				</tr>
				</table>
				</div>
				<div id="shippingAddress">
				<h4>Shipping Address</h4>
				</div>
				<div id="staticcontent">
				<h4>Community Memberships</h4>
				<br />
				<h4>Subscription Services</h4>
				<br />
				
				<input name="sendPromo" type="radio" checked = 'checked' value = "yes"/>Send me promotional literature<br />
				<input name="sendPromo" type="radio" value = "no"/>Do not send me promotional literature<br /></div>

			</div>
			<div class="c2"><input type="submit" value="Create Profile" /></div>
		</form>
		<div id="footer">© 2012 team GKD - CSE336 - Assignment 2</div>
</div>
</body>
</html>

